//https://www.bilibili.com/video/BV1d54y1f7B3/?spm_id_from=333.337.search-card.all.click&vd_source=d6fe65f095f01f05591e89d810720ccc
// 2024-10-19

public class P012_斐波那契数列_递归法 {

    public static void main(String[] args) {
        System.out.println(fib(20));
    }

    //0,1,1,2,3,5,8.....
    private static int fib(int n) {
        if (n == 0 || n == 1) return n;
        return fib(n-1) + fib(n-2);
    }
}
